import request from '@/utils/request'

export function getAll () {
  return request({
    url: `/product/getAll`,
    method: 'get'
  })
}

export function getById (id) {
  return request({
    url: `/product/getById/${id}`,
    method: 'get'
  })
}

export function upsert (data) {
  return request({
    url: `/product/upsert`,
    method: 'post',
    data: data
  })
}
export function removed (data) {
  return request({
    url: `/product/deleteById?id=` + data.id,
    method: 'delete',
    // data:id
  })
}



